/*
 * @Author: Simon 1958058172@qq.com
 * @Date: 2025-08-08 09:06:53
 * @LastEditors: Simon 1958058172@qq.com
 * @LastEditTime: 2025-08-08 09:18:54
 * @FilePath: \java.1212\csdn\baozhuang\li06\Test.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package csdn.baozhuang.li06;

public class Test {
    public static void main(String[] args) {
        String s1="1111222233333";
        String s2=new String("123");
        System.out.println("s1长度"+ s1.length());
        System.out.println("s2长度"+ s2.length());

        System.out.println( "s1.charAt(0)"+s1.charAt(0));
        System.out.println( "s1.charAt(1)"+s1.charAt(1));
        System.out.println( "s1.charAt(2)"+s1.charAt(2));

        //System.out.println(s1.charAt(3));----数组下标越界

        String str=s1.substring(1 );
        System.out.println("截取后："+str);
        String str1=s1.replace('1', '2');
    }
}
